package com.hzxy.yiyid.web.module.repository;

import com.hzxy.yiyid.web.module.repository.entity.SubstandardDrugDo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SubstandardDrugDoRepository extends JpaSpecificationExecutor<SubstandardDrugDo>
        , JpaRepository<SubstandardDrugDo, Long> {

    @Query("from SubstandardDrugDo where ypmc =:ypmc")
    List<SubstandardDrugDo> findByYpmc(@Param("ypmc") String ypmc);
}
